Repository navigation
An assistant answer cites Loom's docs as [help:], checked against the shipped pages, and an invented op or setting name makes it unsupported - #498
Merged
Conversation
zlareb1
force-pushed
the
feat/assistant-help-citations
branch
from
November 10, 2026 19:41
3715320 to
3c9008d
Compare
… shipped pages, and an invented op or setting name makes it unsupported A help citation names a page of the docs the build ships and optionally a section; the bridge checks it against the process's own index and returns the section's anchor, which the dashboard's Sources open on a new Help page. The bridge also lists the backticked op and LOOM_* names an answer writes that the build neither serves nor documents; an answer with one is unsupported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
zlareb1
force-pushed
the
feat/assistant-help-citations
branch
from
November 10, 2026 20:19
3c9008d to
eba8191
Compare
This was referenced Nov 10, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #488
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
An assistant answer about how Loom works cites the documentation it used as
[help:<page> § <section>]; Loom checks each citation against the docs the server ships, and the dashboard links a verified one to a new Help page at that section. An answer that names an op or setting the server neither serves nor documents is marked unsupported, and the names are listed inunknown_names.Why
#488 gave the assistant
help.searchandhelp.get, but its answers could only name a docs page in words, which nothing checks, and the support label could not tell a docs answer from an unsupported one. This PR makes a docs answer cite its sources the way a memory or document answer does, and holds the answer to the instruction "never invent an op or setting name".Design (also in
docs/architecture/assistant.md: the help citation and Names paragraphs of the citation check, and the Support section):Help citation.
[help:<path>]or[help:<path> § <Title > A > B>], the breadcrumb ashelp.searchreturns it. The bridge checks it in process against the replica's own docs index, with no read of Loom's and no HTTP. It is verified when the page is indexed and the section is one of the page's own: its full breadcrumb, the breadcrumb without the page title, or a tail of it that no other section of the page shares (a model often writes the heading alone). A page or section that is not there fails the way a document citation does (no_document,no_section), and docs that cannot be read leave itnot_run. A verified help citation carriesanchor, the section's slug.Names. The tool results stay with the agent, so the bridge checks what it can decide. A backticked dotted name whose first part is an op group, or any
LOOM_*name, is known when one of these holds:NON_SETTINGS_ENV, or a prefix family;A name ending in
_is a family. The rest are returned inunknown_names, and the answer's support isunsupportedwhatever it cites. With no docs to read, none is reported. A name in prose, without backticks or theLOOM_prefix, is not checked.Help page. The dashboard view
help, at/help?page=<path>#<anchor>(the view keeps?page=through boot and navigation), rendershelp.getunder the signed-in session, so the docs are not exposed publicly. A long page is read to its end by followingnext_offset, at most 20 reads. Each heading takes the anchor of the next outline entry the page writes the same way:help.get's outline now carries each heading's text as written, so the dashboard never computes an anchor. It reuses the answer renderer's blocks through a newrenderBlocks(text, spans), adding heading anchors and links between pages:Sources. A verified help citation opens the Help page at its section through the store, as a memory or document opens. When an answer is unsupported for an unknown name, its label names the name.
Instructions. The agent cites each docs section it uses as
[help:...], never as[doc:], and writes op and setting names in backticks only as a tool returned them. The agent definition moves to version 6.Scope and risk
server/assistant/(citation parse and check, the name check indomain/names.py, the support rule'sunknown_names), plus a lookup and an identifier set on the help index.Sources.tsx.anchorandunknown_names.LOOM_*names. The tests pin which names count (test_assistant_help_citations.py).Compatibility, rollout and rollback
AssistantCitation.kindgainshelp, and the citation gainsanchor.assistant.ask, the chat route's whole answer and theloom.citationsevent gainunknown_names.kindas a string are unaffected.[help:], so an answer resting only on help citations shows asnonethere until the upgrade ends. A dashboard of this build reading a page from an earlier replica gets no outline headings, so a Sources link opens that page at its top rather than at the cited section, also until the upgrade ends.[help:]as text.Tests
tests/unit/test_assistant_help_citations.py:tests/unit/test_assistant_support.py: an answer naming an unknown name isunsupportedwhatever it cites.tests/unit/test_assistant_bridge.py:unknown_namesand the label reach the stream, the whole answer andassistant.ask.anchorandunknown_namesare parsed.HelpText.test.tsx: anchors taken from the outline by heading text (a setext heading or a repeated one shifts none), the links it makes and refuses (a link inside a code span is code), and no images or HTML;help.test.ts: a long page read to its end by offset; a deep link's page and anchor kept through boot; a move between sections of one page gets its own history entry;Help.test.tsx: reads the page, scrolls to the anchor (again when a second link opens another section of the same page), follows a link in place, tolerates a malformed anchor, and handles a missing page or no docs;Chat.test.tsx: a verified help citation opens its section on the Help view, the answer's text draws no link, and an unknown name is named in the label.make format,make lintandmake typecheck. The assistant, help, SDK, census, doc-link and public-copy unit tests: 713 passed. The whole dashboard suite: 2,384 passed.npm run buildand the bundle budget passed. The TypeScript SDK check passed.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. The design went through six adversarial architecture reviews to zero findings before the build, and each part is covered by the tests above.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code